package com.slfx.open.api.sdk.common.exception;

public class CommonException extends RuntimeException {

    private static final long serialVersionUID = 1L;
    
    private String code;

    private String msg;

    public CommonException(String code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public CommonException(ErrorCodeEnum bSPErrorCodeEnum) {
        super(bSPErrorCodeEnum.getMsg());
        this.code = bSPErrorCodeEnum.getCode();
        this.msg = bSPErrorCodeEnum.getMsg();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
